﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MOM.aspx.cs" Inherits="PMP.Management.MOM" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Meeting Minutes</title>
    <style type="text/css">
        .style1
        {
            height: 30px;
        }
        .style2
        {
            width: 11%;
        }
        .style3
        {
            width: 381px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <asp:Button ID="btnRefresh" runat="server" Text="Refresh" 
        onclick="btnRefresh_Click" />
    <asp:Button ID="btnActionReminder" runat="server" 
        onclick="btnActionReminder_Click" Text="Send Action Reminder" />
    <table width="100%" style="height: 500px">
        <tr>
            <td style="text-align:left" valign="top" width="50%">
                <div>                
                    <asp:TreeView ID="trvMOMs" runat="server" ImageSet="Simple" Width="98%" 
                        onselectednodechanged="trvMOMs_SelectedNodeChanged" 
                        style="text-align: justify" Height="553px">
                        <ParentNodeStyle Font-Bold="False" />
                        <HoverNodeStyle Font-Underline="True" ForeColor="#5555DD" />
                        <SelectedNodeStyle Font-Underline="True" ForeColor="#5555DD" 
                            HorizontalPadding="0px" VerticalPadding="0px" />
                        <NodeStyle Font-Names="Tahoma" Font-Size="10pt" ForeColor="Black" 
                            HorizontalPadding="0px" NodeSpacing="0px" VerticalPadding="0px" />
                    </asp:TreeView>
                
                </div>
            </td>
            <td width="500px" valign="top">
                <div>
                    <asp:Panel ID="pnlCategory" runat="server" Visible="false">
                        <table>
                            <tr>
                                <td>Category:</td>
                                <td>
                                    <asp:TextBox ID="txtCategoryDesc" runat="server" Width="200px"></asp:TextBox>
                                </td>
                            </tr>
                        </table>
                    </asp:Panel>
                    <asp:Panel ID="pnlMoM" runat="server" Visible="false">
                        <table>
                            <tr>
                                <td>MOM Title:</td>
                                <td>
                                    <asp:TextBox ID="txtTitle" runat="server" Width="200px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>Chairman:</td>
                                <td>
                                    <asp:TextBox ID="txtChairman" runat="server" Width="200px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>Duration:</td>
                                <td>
                                    <asp:TextBox ID="txtDuration" runat="server" Width="200px"></asp:TextBox> (In Minutes)
                                </td>
                            </tr>
                            <tr>
                                <td>Participants:</td>
                                <td>
                                    <asp:TextBox ID="txtAttendee" runat="server" Width="200px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>Copy To:</td>
                                <td>
                                    <asp:TextBox ID="txtCopyTo" runat="server" Width="200px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>Date:</td>
                                <td>
                                    <asp:TextBox ID="txtDate" runat="server" Width="200px"></asp:TextBox> (yyyy-mm-dd)
                                </td>
                            </tr>
                            <tr>
                                <td>Next Date:</td>
                                <td>
                                    <asp:TextBox ID="txtNextDate" runat="server" Width="200px"></asp:TextBox> (yyyy-mm-dd)
                                </td>
                            </tr>
                            <tr>
                                <td>MOM Date:</td>
                                <td>
                                    <asp:TextBox ID="txtMOMDate" runat="server" Width="200px"></asp:TextBox> (yyyy-mm-dd)
                                </td>
                            </tr>
                            <tr>
                                <td>Created By:</td>
                                <td>
                                    <asp:TextBox ID="txtCreatedBy" runat="server" Width="200px"></asp:TextBox>
                                </td>
                            </tr>
                        </table>
                    </asp:Panel>
                    <asp:Panel ID="pnlDetails" runat="server" Visible="false">
                        <table style="border-style:solid; border-width="1">
                            <tr>
                                <td>Agenda:</td>
                                <td>
                                    <asp:TextBox ID="txtAgenda" runat="server" TextMode="MultiLine" Width="290px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>Duration:</td>
                                <td>
                                    <asp:TextBox ID="txtAgendaDuration" runat="server" Width="290px"></asp:TextBox> (In Minutes)
                                </td>
                            </tr>
                            <tr>
                                <td>Presenter:</td>
                                <td>
                                    <asp:TextBox ID="txtPresenter" runat="server" Width="290px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td><asp:Button ID="btnAddAgenda" runat="server" Text="Add" 
                                        onclick="btnAddAgenda_Click" /></td>
                                <td>
                                </td>
                            </tr>
                        </table>
                        <table style="border-style:solid; border-width=1">
                            <tr>
                                <td>Decision:</td>
                                <td>
                                    <asp:TextBox ID="txtDecision" runat="server" TextMode="MultiLine" Width="290px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="style1">Due Date:</td>
                                <td class="style1">
                                    <asp:TextBox ID="txtDecDueDate" runat="server" Width="290px"></asp:TextBox> (yyyy-mm-dd)
                                </td>
                            </tr>
                            <tr>
                                <td>Maker:</td>
                                <td>
                                    <asp:TextBox ID="txtMaker" runat="server" Width="290px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td><asp:Button ID="btnAddDecision" runat="server" Text="Add" 
                                        onclick="btnAddDecision_Click" /></td>
                                <td>
                                </td>
                            </tr>
                        </table>
                        <table style="border-style:solid; border-width=1">
                            <tr>
                                <td>Note:</td>
                                <td>
                                    <asp:TextBox ID="txtNote" runat="server" TextMode="MultiLine" Width="290px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td><asp:Button ID="btnAddNote" runat="server" Text="Add" 
                                        onclick="btnAddNote_Click" style="height: 26px" /></td>
                                <td>
                                </td>
                            </tr>
                        </table>
                        <table style="border-style:solid; border-width=1;">
                            <tr>
                                <td>Action:</td>
                                <td>
                                    <asp:TextBox ID="txtAction" runat="server" TextMode="MultiLine" Width="290px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>Status:</td>
                                <td>
                                    <asp:TextBox ID="txtActionSts" runat="server" Width="290px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>Due Date:</td>
                                <td>
                                    <asp:TextBox ID="txtActionDueDate" runat="server" Width="290px"></asp:TextBox> (yyyy-mm-dd)
                                </td>
                            </tr>
                            <tr>
                                <td>Owner:</td>
                                <td>
                                    <asp:DropDownList ID="ddlOwners" runat="server" 
                                        DataSourceID="SqlDataSourceOwners" DataTextField="usr_name" 
                                        DataValueField="usr_name" Height="21px" Width="290px">
                                    </asp:DropDownList>
                                    <asp:SqlDataSource ID="SqlDataSourceOwners" runat="server" 
                                        ConnectionString="<%$ ConnectionStrings:LocalConnectionString %>" 
                                        ProviderName="<%$ ConnectionStrings:LocalConnectionString.ProviderName %>" SelectCommand="select top 1 '' usr_name from usr
union
SELECT [usr_name] FROM [usr]
order by usr_name"></asp:SqlDataSource>
                                </td>
                            </tr>
                            <tr>
                                <td><asp:Button ID="btnAddAction" runat="server" Text="Add" 
                                        onclick="btnAddAction_Click" /></td>
                                <td>
                                </td>
                            </tr>
                        </table>
                    </asp:Panel>
                    <asp:Button ID="btnAddCategory" runat="server" Text="Add" Visible="False" 
                        onclick="btnAddCategory_Click" />
                    <asp:Button ID="btnAddMOM" runat="server" Text="Add" Visible="False" 
                        onclick="btnAddMOM_Click" />
                </div>
            </td>
        </tr>
    </table>
    <br />
    <table>
        <tr>
            <td colspan="2">
            <asp:GridView ID="grvMOM" runat="server" AutoGenerateColumns="False"
        CellPadding="4" ForeColor="#333333" DataKeyNames="ID" DataSourceID="SqlDataSource1" OnRowEditing="grvMOM_OnRowEditing" OnRowUpdated="grvMOM_OnRowUpdated" OnRowCancelingEdit="grvMOM_OnRowCancelingEdit" OnRowDeleted="grvMOM_OnRowDeleted"
                    >
        <RowStyle BackColor="#EFF3FB" />
                <Columns>
                    <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
                    <asp:BoundField DataField="chairman" HeaderText="chairman" 
                        SortExpression="chairman" />
                    <asp:BoundField DataField="duration" HeaderText="duration" 
                        SortExpression="duration" />
                    <asp:BoundField DataField="attendee" HeaderText="attendee" 
                        SortExpression="attendee" />
                    <asp:BoundField DataField="copyto" HeaderText="copyto" 
                        SortExpression="copyto" />
                    <asp:BoundField DataField="meeting_date" HeaderText="meeting_date" DataFormatString="{0:MM/dd/yyyy}"
                        SortExpression="meeting_date" />
                    <asp:BoundField DataField="created_date" HeaderText="created_date" DataFormatString="{0:MM/dd/yyyy}"
                        SortExpression="created_date" />
                    <asp:BoundField DataField="created_by" HeaderText="created_by" 
                        SortExpression="created_by" />
                    <asp:BoundField DataField="next" HeaderText="next" SortExpression="next" DataFormatString="{0:MM/dd/yyyy}" />
                    <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" 
                        ReadOnly="True" SortExpression="ID" />
                </Columns>
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <EditRowStyle BackColor="#2461BF" />
        <AlternatingRowStyle BackColor="White" />
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:LocalConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:LocalConnectionString.ProviderName %>" 
        
                    SelectCommand="SELECT [chairman], [duration], [attendee], [copyto], [meeting_date], [created_date], [created_by], [next], [ID] FROM [mom]" 
                    DeleteCommand="DELETE FROM [mom] WHERE [ID] = ?" 
                    
                    UpdateCommand="UPDATE [mom] SET [chairman] = ?, [duration] = ?, [attendee] = ?, [copyto] = ?, [meeting_date] = ?, [created_date] = ?, [created_by] = ?, [next] = ? WHERE [ID] = ?" 
                    
                    InsertCommand="INSERT INTO [mom] ([chairman], [duration], [attendee], [copyto], [meeting_date], [created_date], [created_by], [next], [ID]) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)">
        <DeleteParameters>
            <asp:Parameter Name="ID" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="chairman" Type="String" />
            <asp:Parameter Name="duration" Type="Int32" />
            <asp:Parameter Name="attendee" Type="String" />
            <asp:Parameter Name="copyto" Type="String" />
            <asp:Parameter Name="meeting_date" Type="DateTime" />
            <asp:Parameter Name="created_date" Type="DateTime" />
            <asp:Parameter Name="created_by" Type="String" />
            <asp:Parameter Name="next" Type="DateTime" />
            <asp:Parameter Name="ID" Type="Int32" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="chairman" Type="String" />
            <asp:Parameter Name="duration" Type="Int32" />
            <asp:Parameter Name="attendee" Type="String" />
            <asp:Parameter Name="copyto" Type="String" />
            <asp:Parameter Name="meeting_date" Type="DateTime" />
            <asp:Parameter Name="created_date" Type="DateTime" />
            <asp:Parameter Name="created_by" Type="String" />
            <asp:Parameter Name="next" Type="DateTime" />
            <asp:Parameter Name="ID" Type="Int32" />
        </InsertParameters>
    </asp:SqlDataSource>
            </td>
        </tr>
        <tr>
            <td colspan="2">
            <asp:GridView ID="grvAgenda" runat="server" AutoGenerateColumns="False" OnRowEditing="grvAgenda_OnRowEditing" OnRowUpdated="grvAgenda_OnRowUpdated" OnRowCancelingEdit="grvAgenda_OnRowCancelingEdit" OnRowDeleted="grvAgenda_OnRowDeleted"
        CellPadding="4" ForeColor="#333333" DataKeyNames="ID" DataSourceID="SqlDataSourceAgenda" 
                    >
        <RowStyle BackColor="#EFF3FB" />
                <Columns>
                    <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
                    <asp:BoundField DataField="agenda" HeaderText="agenda" 
                        SortExpression="agenda" />
                    <asp:BoundField DataField="duration" HeaderText="duration" 
                        SortExpression="duration" />
                    <asp:BoundField DataField="presenter" HeaderText="presenter" 
                        SortExpression="presenter" />
                    <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" 
                        ReadOnly="True" SortExpression="ID" />
                </Columns>
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <EditRowStyle BackColor="#2461BF" />
        <AlternatingRowStyle BackColor="White" />
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSourceAgenda" runat="server" 
        ConnectionString="<%$ ConnectionStrings:LocalConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:LocalConnectionString.ProviderName %>" 
        
                    SelectCommand="SELECT [agenda], [duration], [presenter], [ID] FROM [mom_agenda] ORDER BY [agenda]" 
                    DeleteCommand="DELETE FROM [mom_agenda] WHERE [ID] = ?" 
                    
                    UpdateCommand="UPDATE [mom_agenda] SET [agenda] = ?, [duration] = ?, [presenter] = ? WHERE [ID] = ?" 
                    InsertCommand="INSERT INTO [mom_agenda] ([agenda], [duration], [presenter], [ID]) VALUES (?, ?, ?, ?)">
        <DeleteParameters>
            <asp:Parameter Name="ID" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="agenda" Type="String" />
            <asp:Parameter Name="duration" Type="Int32" />
            <asp:Parameter Name="presenter" Type="String" />
            <asp:Parameter Name="ID" Type="Int32" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="agenda" Type="String" />
            <asp:Parameter Name="duration" Type="Int32" />
            <asp:Parameter Name="presenter" Type="String" />
            <asp:Parameter Name="ID" Type="Int32" />
        </InsertParameters>
    </asp:SqlDataSource>
            </td>
        </tr>
        <tr>
            <td colspan="2">
            <asp:GridView ID="grvDecision" runat="server" AutoGenerateColumns="False" OnRowEditing="grvDecision_OnRowEditing" OnRowUpdated="grvDecision_OnRowUpdated" OnRowCancelingEdit="grvDecision_OnRowCancelingEdit" OnRowDeleted="grvDecision_OnRowDeleted"
        CellPadding="4" ForeColor="#333333" DataKeyNames="ID" DataSourceID="SqlDataSourceDecision" 
                    >
        <RowStyle BackColor="#EFF3FB" />
                <Columns>
                    <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
                    <asp:BoundField DataField="decision" HeaderText="decision" 
                        SortExpression="decision" />
                    <asp:BoundField DataField="duedate" HeaderText="duedate" DataFormatString="{0:MM/dd/yyyy}"
                        SortExpression="duedate" />
                    <asp:BoundField DataField="maker" HeaderText="maker" SortExpression="maker" />
                    <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" 
                        ReadOnly="True" SortExpression="ID" />
                </Columns>
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <EditRowStyle BackColor="#2461BF" />
        <AlternatingRowStyle BackColor="White" />
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSourceDecision" runat="server" 
        ConnectionString="<%$ ConnectionStrings:LocalConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:LocalConnectionString.ProviderName %>" 
        
                    SelectCommand="SELECT [decision], [duedate], [maker], [ID] FROM [mom_decision] ORDER BY [decision]" 
                    DeleteCommand="DELETE FROM [mom_decision] WHERE [ID] = ?" 
                    
                    
                    UpdateCommand="UPDATE [mom_decision] SET [decision] = ?, [duedate] = ?, [maker] = ? WHERE [ID] = ?" 
                    InsertCommand="INSERT INTO [mom_decision] ([decision], [duedate], [maker], [ID]) VALUES (?, ?, ?, ?)">
        <DeleteParameters>
            <asp:Parameter Name="ID" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="decision" Type="String" />
            <asp:Parameter Name="duedate" Type="DateTime" />
            <asp:Parameter Name="maker" Type="String" />
            <asp:Parameter Name="ID" Type="Int32" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="decision" Type="String" />
            <asp:Parameter Name="duedate" Type="DateTime" />
            <asp:Parameter Name="maker" Type="String" />
            <asp:Parameter Name="ID" Type="Int32" />
        </InsertParameters>
    </asp:SqlDataSource>
            </td>
        </tr>
        <tr>
            <td colspan="2">
            <asp:GridView ID="grvNotes" runat="server" AutoGenerateColumns="False" 
                    OnRowEditing="grvNotes_OnRowEditing" OnRowUpdated="grvNotes_OnRowUpdated" 
                    OnRowCancelingEdit="grvNotes_OnRowCancelingEdit" OnRowDeleted="grvNotes_OnRowDeleted"
        CellPadding="4" ForeColor="#333333" DataKeyNames="ID" DataSourceID="SqlDataSourceNotes" 
                    >
        <RowStyle BackColor="#EFF3FB" />
                <Columns>
                    <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
                    <asp:BoundField DataField="notes" HeaderText="notes" 
                        SortExpression="notes" />
                    <asp:BoundField DataField="mom_id" HeaderText="mom_id"
                        SortExpression="mom_id" />
                    <asp:BoundField DataField="ID" HeaderText="ID" SortExpression="ID" 
                        InsertVisible="False" ReadOnly="True" />
                </Columns>
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <EditRowStyle BackColor="#2461BF" />
        <AlternatingRowStyle BackColor="White" />
    </asp:GridView>
                <asp:SqlDataSource ID="SqlDataSourceNotes" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:LocalConnectionString %>" 
                    DeleteCommand="DELETE FROM [mom_notes] WHERE [ID] = ?" 
                    InsertCommand="INSERT INTO [mom_notes] ([notes], [mom_id], [ID]) VALUES (?, ?, ?)" 
                    ProviderName="<%$ ConnectionStrings:LocalConnectionString.ProviderName %>" 
                    SelectCommand="SELECT [notes], [mom_id], [ID] FROM [mom_notes] ORDER BY [notes]" 
                    UpdateCommand="UPDATE [mom_notes] SET [notes] = ?, [mom_id] = ? WHERE [ID] = ?">
                    <DeleteParameters>
                        <asp:Parameter Name="ID" Type="Int32" />
                    </DeleteParameters>
                    <UpdateParameters>
                        <asp:Parameter Name="notes" Type="String" />
                        <asp:Parameter Name="mom_id" Type="Int32" />
                        <asp:Parameter Name="ID" Type="Int32" />
                    </UpdateParameters>
                    <InsertParameters>
                        <asp:Parameter Name="notes" Type="String" />
                        <asp:Parameter Name="mom_id" Type="Int32" />
                        <asp:Parameter Name="ID" Type="Int32" />
                    </InsertParameters>
                </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
        ConnectionString="<%$ ConnectionStrings:LocalConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:LocalConnectionString.ProviderName %>" 
        
                    SelectCommand="SELECT [decision], [duedate], [maker], [ID] FROM [mom_decision] ORDER BY [decision]" 
                    DeleteCommand="DELETE FROM [mom_decision] WHERE [ID] = ?" 
                    
                    
                    UpdateCommand="UPDATE [mom_decision] SET [decision] = ?, [duedate] = ?, [maker] = ? WHERE [ID] = ?" 
                    InsertCommand="INSERT INTO [mom_decision] ([decision], [duedate], [maker], [ID]) VALUES (?, ?, ?, ?)">
        <DeleteParameters>
            <asp:Parameter Name="ID" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="decision" Type="String" />
            <asp:Parameter Name="duedate" Type="DateTime" />
            <asp:Parameter Name="maker" Type="String" />
            <asp:Parameter Name="ID" Type="Int32" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="decision" Type="String" />
            <asp:Parameter Name="duedate" Type="DateTime" />
            <asp:Parameter Name="maker" Type="String" />
            <asp:Parameter Name="ID" Type="Int32" />
        </InsertParameters>
    </asp:SqlDataSource>
            </td>
        </tr>
        <tr>
            <td colspan="2">
            Action Status: Open -> In Progress -> Closed 
            <asp:GridView ID="grvActions" runat="server" AutoGenerateColumns="False" OnRowEditing="grvActions_OnRowEditing" OnRowUpdated="grvActions_OnRowUpdated" OnRowCancelingEdit="grvActions_OnRowCancelingEdit" OnRowDeleted="grvActions_OnRowDeleted"
        CellPadding="4" ForeColor="#333333" DataKeyNames="ID" DataSourceID="SqlDataSourceActions" 
                    >
        <RowStyle BackColor="#EFF3FB" />
                <Columns>
                    <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
                    <asp:BoundField DataField="action" HeaderText="action" 
                        SortExpression="action" />
                    <asp:BoundField DataField="status" HeaderText="status" 
                        SortExpression="status" />
                    <asp:BoundField DataField="duedate" HeaderText="duedate" DataFormatString="{0:MM/dd/yyyy}"
                        SortExpression="duedate" />
                    <asp:BoundField DataField="owner" HeaderText="owner" SortExpression="owner" />
                    <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" 
                        ReadOnly="True" SortExpression="ID" />
                </Columns>
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <EditRowStyle BackColor="#2461BF" />
        <AlternatingRowStyle BackColor="White" />
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSourceActions" runat="server" 
        ConnectionString="<%$ ConnectionStrings:LocalConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:LocalConnectionString.ProviderName %>" 
        
                    SelectCommand="SELECT [action], [status], [duedate], [owner], [ID] FROM [mom_action] ORDER BY [owner], [action]" 
                    DeleteCommand="DELETE FROM [mom_action] WHERE [ID] = ?" 
                    
                    
                    
                    UpdateCommand="UPDATE [mom_action] SET [action] = ?, [status] = ?, [duedate] = ?, [owner] = ? WHERE [ID] = ?" 
                    InsertCommand="INSERT INTO [mom_action] ([action], [status], [duedate], [owner], [ID]) VALUES (?, ?, ?, ?, ?)">
        <DeleteParameters>
            <asp:Parameter Name="ID" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="action" Type="String" />
            <asp:Parameter Name="status" Type="String" />
            <asp:Parameter Name="duedate" Type="DateTime" />
            <asp:Parameter Name="owner" Type="String" />
            <asp:Parameter Name="ID" Type="Int32" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="action" Type="String" />
            <asp:Parameter Name="status" Type="String" />
            <asp:Parameter Name="duedate" Type="DateTime" />
            <asp:Parameter Name="owner" Type="String" />
            <asp:Parameter Name="ID" Type="Int32" />
        </InsertParameters>
    </asp:SqlDataSource> 
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
